home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Illustrated Works of Shakespeare
/
Illustrated Works of Shakespeare, The (1990)(Animated Pixels)[!][CDTV-PC].iso
/
shakes
/
code
/
tutorial.amos
/
tutorial.amosSourceCode
< prev
Wrap
AMOS Source Code
|
1991-04-10
|
4KB
|
169 lines
Set Buffer 20
Global M_KEY,LAST_M_KEY,LAST_KEY$,K_KEY$
Hide
X Mouse=288
Y Mouse=200-(43*PAL)
Screen Open 0,640,256,16,Hires
Cls 0 : Curs Off : Flash Off
Z=0 : Z1=-1
Z1$=Str$(Z)-" "
Load Iff "Ap:Shakes/Graphics/Animated-Pixels.Iff",7
Timer=0
Set Envel 1,0 To 2,63
MOUSE_CONVERT
Load Iff "Ap:Shakes/Tutorial/Help_Screen"+Z1$,0 : Screen Hide 0
'Paste Bob 540,192,7
Screen Display 0,128,35,640,256
Timer=0
Repeat
MOUSE_CONVERT
Until M_KEY<>0 or Timer>50*5
Screen Close 7
Screen Show 0
XM=0 : OLD_XM=-1
Colour 17,$D97
Colour 18,$D75
Colour 19,$C54
FLAG_EXIT=0
SUB=0
Repeat
MOUSE_CONVERT
If(Z1>1 and Z=0) or Z<>0
If(M_KEY and 4)=4
XM=0
End If
If(M_KEY and 8)=8
XM=1
End If
End If
If Z1=0 and Z=9
XM=1
End If
If OLD_XM<>XM
Sprite 1,128+16+(XM*248),230,1
End If
OLD_XM=XM
If(M_KEY and $10)<>0 and(XM=1)
FLAG_EXIT=1
Sprite 1,,,2
OLD_XM=-1
End If
If(M_KEY and $10)<>0 and(XM=0)
Sprite 1,,,2
Wait Vbl
OLD_XM=-1
Add Z1,1
Z1$=Str$(Z)-" "
If Z1>-1
B$=Chr$(Z1+Asc("a"))
Else
B$=""
End If
If Exist("Ap:Shakes/Tutorial/Help_Screen"+Z1$+B$)
Load Iff "Ap:Shakes/Tutorial/Help_Screen"+Z1$+B$,4 : Screen Hide 4
If Z<9 and Z>0
Paste Bob 12,192,6
Paste Bob 540,192,7
End If
Screen 0
Fade 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 : Wait 16
Screen Copy 4 To 0
Fade 1 To 4,$FFFF
Else
If Z<9
Z1=-1
Add Z,1
Z1$=Str$(Z)-" "
If Z1>-1
B$=Chr$(Z1+Asc("a"))
Else
B$=""
End If
Load Iff "Ap:Shakes/Tutorial/Help_Screen"+Z1$+B$,4 : Screen Hide 4
If Z<9 and Z>0
Paste Bob 12,192,6
Paste Bob 540,192,7
End If
Screen 0
Fade 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 : Wait 16
Screen Copy 4 To 0
Fade 1 To 4,$FFFF
End If
End If
End If
If(M_KEY and $20)<>0
Sprite 1,,,2
Wait Vbl
OLD_XM=-1
If Z1>-1
Add Z1,-1
B$=Chr$(Z1+Asc("a"))
Else
Z1=-1
If Z>0
Add Z,-1
Z1$=Str$(Z)-" "
Z1=-1
Repeat
If Z1>-1
B$=Chr$(Z1+Asc("a"))
End If
Inc Z1
Until Not(Exist("Ap:Shakes/Tutorial/Help_Screen"+Z1$+B$))
Add Z1,-2
End If
End If
If Z1>-1
B$=Chr$(Z1+Asc("a"))
Else
B$=""
End If
Z1$=Str$(Z)-" "
If Exist("Ap:Shakes/Tutorial/Help_Screen"+Z1$+B$)
Load Iff "Ap:Shakes/Tutorial/Help_Screen"+Z1$+B$,4 : Screen Hide 4
If Z>0
Paste Bob 12,192,6
Paste Bob 540,192,7
End If
Screen 0
Fade 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 : Wait 16
Screen Copy 4 To 0
Fade 1 To 4,$FFFF
End If
End If
Until FLAG_EXIT=1
Load Iff "Ap:Shakes/Tutorial/Help_End",4 : Screen Hide 4
Screen 0
Fade 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 : Rem Wait 16
Screen Copy 4 To 0
Fade 1 To 4,$FFFF
Screen Close 4
Sprite Off 1 : Erase 1
Wait 1
Run "Ap:Shakes/Code/Shakespeare.Amos"
Procedure MOUSE_CONVERT
X Mouse=288
Y Mouse=200-(43*PAL)
M_KEY=0
OLD_TIMER=Timer
Repeat
XT=X Mouse
YT=Y Mouse
If YT<200-(43*PAL) Then M_KEY=(M_KEY or 1)
If YT>200-(43*PAL) Then M_KEY=(M_KEY or 2)
If XT<288 Then M_KEY=(M_KEY or 4)
If XT>288 Then M_KEY=(M_KEY or 8)
K_KEY$=Inkey$
If Key State($4C) Then M_KEY=(M_KEY or 1)
If Key State($4D) Then M_KEY=(M_KEY or 2)
If Key State($4F) Then M_KEY=(M_KEY or 4)
If Key State($4E) Then M_KEY=(M_KEY or 8)
If Key State($50) Then M_KEY=(M_KEY or 16)
If Key State($51) Then M_KEY=(M_KEY or 32)
If Key State($45) or Key State(95) Then M_KEY=(M_KEY or 64)
If Key State($43) Then M_KEY=(M_KEY or 128)
M_KEY=M_KEY+(Mouse Key*16)
Until M_KEY<>0 or NO_REPEAT_FLG=1 or(Timer>OLD_TIMER+4) or(K_KEY$<>"")
If(M_KEY and $FF)<>0 and SND_FLAG=0 and(LAST_M_KEY<>M_KEY) Then Play $F,50,0
LAST_M_KEY=M_KEY : LAST_KEY$=K_KEY$
End Proc